function output_image = arnold_transform(input_image, iterations)
    % Arnold正变换
    [h, w]=size(input_image) ;
    a = 3;
    b = 4;
    output_image = zeros(h,w);    %[h, w]=size(img) 
    for i=1:iterations   %iterations为置乱轮数
        for y=1:h
            for x=1:w           
                xx=mod((x-1)+b*(y-1),h)+1;  %a,b可提前指定
                yy=mod(a*(x-1)+(a*b+1)*(y-1),h)+1;        
                output_image(yy,xx)=input_image(y,x);                
            end
        end
        input_image=output_image;
    end

end